﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Weixin.BLL.ChinaTax;
using Weixin.Entity.ChinaTax;

namespace Weixin.Web
{
    public partial class Question : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["act"] == "save")
            {
                askBLL _askBLL = askBLL.GetInstance();
                askEntity _askEntity = new askEntity();
                _askEntity.title = Request.Form["txtTitle"];
                _askEntity.content = Request.Form["txtDetail"];
                _askEntity.state = 0;
                _askEntity.utime = DateTime.Now;
                _askEntity.dtime = DateTime.Now;
                _askEntity.tag = "";
                _askEntity.isHot = 0;
                _askEntity.username = "";
                _askEntity.flag = 0;
                _askEntity.RealName = "佚名";
                _askEntity.Mobile = Request.Form["txtMobile"];
                _askEntity.Email = Request.Form["txtEmail"];
                _askEntity.SourceId = 1;

                if (_askBLL.Insert(_askEntity) > 0)
                {
                    Response.Redirect("Success.aspx");
                }
            }
        }
    }
}